package net.huashitong.taskGroup.databean;

public enum AddressHeaders {

    branch("branch","单位"),
    role("role","角色"),
    userName("userName","姓名"),
    phone("phone","联系电话")
    ;


    private String code;
    private  String value;

    AddressHeaders(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static AddressHeaders getValues(String code)
    {
        for ( AddressHeaders  ad : values())
        {
            if(ad.getCode().equals(code))
            {
                return  ad;
            }
        }

        return  null;
    }


}
